#pragma once

#include <string>
#include <glm/glm.hpp>
#include "engine/platform/texture.h"
#include <memory>

namespace kanon
{
    class SpriteSheet
    {
    private:
        std::shared_ptr<Texture2D> texture;
        uint32_t num_rows;
        uint32_t num_cols;

    public:
        SpriteSheet(const std::string& file_path, uint32_t num_rows, uint32_t num_cols);
        uint32_t Count() const { return num_rows * num_cols; }
        uint32_t Rows() const { return num_rows; }
        uint32_t Cols() const { return num_cols; }
        glm::vec4 GetSubUV(uint32_t row, uint32_t col);

    };
}